/*
 * IndicatorControl.h
 *
 *  Created on: 2011-1-9
 *      Author: Administrator
 */

#ifndef INDICATORCONTROL_H_
#define INDICATORCONTROL_H_

#include "ImageControl.h"

class MIndicatorObserver
	{
public:
	virtual void HandleIndicatorEventL(TInt aResult) = 0;
	};

class CIndicatorControl : public CImageControl
	{
public:
    static CIndicatorControl* NewL(const TRect& aRect,const CCoeControl* aParent);
	static CIndicatorControl* NewLC(const TRect& aRect,const CCoeControl* aParent);
	virtual ~CIndicatorControl();
	
public:
	void HandlePointerEventL(const TPointerEvent& aPointerEvent);
	void Draw(CWindowGc& gc, const TRect& aRect) const;
	void SetLayout();
	void setLabelTextL(const TDesC& aText);
	void setCanCancel(TBool aCan);
	void setCanSure(TBool aCan);
	void setIndicatorObserver(MIndicatorObserver* aObserver);
	
protected:
	CIndicatorControl();
	
private:
	HBufC* iLabelText;
	TBool iCanCancel;
	TBool iCanSure;
	TRect iCancelRect;
	TRect iSureRect;
	MIndicatorObserver* iObserver;
	};

#endif /* INDICATORCONTROL_H_ */
